function g1 = static_g1(T, y, x, params, T_flag)
% function g1 = static_g1(T, y, x, params, T_flag)
%
% File created by Dynare Preprocessor from .mod file
%
% Inputs:
%   T         [#temp variables by 1]  double   vector of temporary terms to be filled by function
%   y         [M_.endo_nbr by 1]      double   vector of endogenous variables in declaration order
%   x         [M_.exo_nbr by 1]       double   vector of exogenous variables in declaration order
%   params    [M_.param_nbr by 1]     double   vector of parameter values in declaration order
%                                              to evaluate the model
%   T_flag    boolean                 boolean  flag saying whether or not to calculate temporary terms
%
% Output:
%   g1
%

if T_flag
    T = MIU.static_g1_tt(T, y, x, params);
end
g1 = zeros(10, 10);
g1(1,3)=(-1)/(y(3)*y(3))-(-(y(7)*params(1)*y(7)))/(y(3)*y(7)*y(3)*y(7));
g1(1,6)=(-((-(y(7)*params(10)))/(y(6)*y(6))));
g1(1,7)=(-((params(1)*y(3)*y(7)-y(3)*params(1)*y(7))/(y(3)*y(7)*y(3)*y(7))+params(10)/y(6)));
g1(2,1)=(-(params(8)/(y(1)*y(1))));
g1(2,3)=(-1)/(y(3)*y(3));
g1(3,2)=(-(params(1)/y(3)));
g1(3,3)=(-1)/(y(3)*y(3))-(1+y(2)-params(2))*(-params(1))/(y(3)*y(3));
g1(4,1)=(-y(5));
g1(4,2)=(-y(4));
g1(4,3)=1;
g1(4,4)=1-(y(2)+1-params(2));
g1(4,5)=(-y(1));
g1(4,6)=1/y(7)-(1/y(7)+(y(8)-1)/y(7));
g1(4,7)=(-y(6))/(y(7)*y(7))-((-y(6))/(y(7)*y(7))+(-(y(6)*(y(8)-1)))/(y(7)*y(7)));
g1(4,8)=(-(y(6)/y(7)));
g1(5,1)=1;
g1(5,4)=(-(T(2)*(1-params(3))*y(9)*T(5)));
g1(5,5)=(-((1-params(3))*y(9)*T(1)*getPowerDeriv(y(5),(-params(3)),1)));
g1(5,9)=(-(T(2)*(1-params(3))*T(1)));
g1(6,2)=1;
g1(6,4)=(-(params(3)*y(9)*1/y(5)*T(6)));
g1(6,5)=(-(params(3)*y(9)*T(6)*(-y(4))/(y(5)*y(5))));
g1(6,9)=(-(params(3)*T(3)));
g1(7,4)=(-(T(4)*y(9)*T(5)));
g1(7,5)=(-(y(9)*T(1)*getPowerDeriv(y(5),1-params(3),1)));
g1(7,9)=(-(T(1)*T(4)));
g1(7,10)=1;
g1(8,8)=1/y(8)-params(7)*1/y(8);
g1(9,6)=1-y(8);
g1(9,8)=(-y(6));
g1(10,9)=1/y(9)-params(6)*1/y(9);
if ~isreal(g1)
    g1 = real(g1)+2*imag(g1);
end
end
